/* 基础样式 - 使用与主页面一致的配色变量 */
:root {
	--primary-color: #f8f0e3;
	--secondary-color: #eadbc8;
	--accent-color: #e76f51;
	--accent-hover: #f4a261;
	--text-color: #433520;
	--bg-color: #faf6f0;
	--card-bg: #ffffff;
	--lighter-bg: #f5efe6;
	--border-color: #ddd0c0;
	--success-color: #6b9080;
	--warning-color: #e9c46a;
	--danger-color: #e63946;
	--code-bg: #f0e6d9;
	--shadow-color: rgba(0, 0, 0, 0.1);
	--encrypt-color: #e76f51;
	--encrypt-bg: rgba(231, 111, 81, 0.1);
	--diary-color: #6b9080;
	--diary-bg: rgba(107, 144, 128, 0.1);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
}

/* 顶部侧边栏 */
.top-sidebar-cotainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--primary-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.top-sidebar {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.img-cycle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--card-bg);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 3px solid var(--accent-color);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.img-cycle:hover {
    transform: scale(1.1) rotate(5deg);
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 6px 12px var(--shadow-color);
}

.top-sidebar a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    transition: all 0.3s;
    font-size: 18px;
}

.top-sidebar a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* 管理按钮特殊样式 */
.management-btn {
    background: var(--accent-color) !important;
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 16px !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.management-btn:hover {
    background: var(--accent-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* 搜索容器 */
.search-container {
    display: flex;
    align-items: center;
    margin-left: auto;
    max-width: 350px;
    flex-grow: 1;
}

#search {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 25px 0 0 25px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

#search:focus {
    box-shadow: 0 0 0 2px var(--accent-color);
    border-color: var(--accent-color);
}

.search-btn {
    padding: 8px 16px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.search-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* 视图切换按钮 */
.view-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.view-toggle:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* 页面标题 - 大幅减少空间 */
.page-header {
    text-align: center;
    padding: 20px 20px 15px;
    margin-top: 60px;
    background-color: var(--lighter-bg);
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.page-description {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
    font-weight: 300;
}

/* 统计信息 - 减少padding */
.stats-section {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    background-color: var(--card-bg);
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
    min-width: 120px;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px var(--shadow-color);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-color);
    font-weight: 500;
}

/* 筛选区域 - 减少padding */
.filter-section {
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.filter-title {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 12px;
    text-align: center;
    font-weight: 600;
}

.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.tag-filter {
    padding: 6px 12px;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.tag-filter:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.tag-filter.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Tag size variations based on count */
.tag-size-small {
    font-size: 11px;
    padding: 4px 8px;
}

.tag-size-medium {
    font-size: 13px;
    padding: 6px 12px;
}

.tag-size-large {
    font-size: 16px;
    padding: 8px 16px;
    font-weight: 600;
}

/* 容器 - 减少padding */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

/* 列表视图样式 */
.container.list-view {
    grid-template-columns: 1fr;
    max-width: 800px;
}

.container.list-view .link-card {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    min-height: 70px;
}

.container.list-view .link-with-dot {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0;
}

.container.list-view .blog-title {
    font-size: 1rem;
    margin-bottom: 0;
    margin-right: 15px;
    min-width: 180px;
}

.container.list-view .blog-time {
    margin-bottom: 0;
    margin-right: 15px;
    min-width: 130px;
    font-size: 0.8rem;
}

.container.list-view .blog-tags {
    margin-top: 0;
    margin-left: auto;
}

/* 博客卡片 - 减少padding */
.link-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px var(--shadow-color);
}

.link-card:hover::before {
    width: 8px;
}

.link-with-dot {
    display: block;
    padding: 15px;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.blog-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    line-height: 1.3;
}

/* 权限图标通用样式 */
.encrypt-lock,
.diary-icon,


/* 加密锁样式 */
.encrypt-lock {
    color: var(--encrypt-color);
    background: var(--encrypt-bg);
}

.encrypt-lock:hover {
    background: var(--encrypt-color);
    color: white;
    transform: scale(1.1);
}

/* 日记图标样式 */
.diary-icon {
    color: var(--diary-color);
    background: var(--diary-bg);
}

.diary-icon:hover {
    background: var(--diary-color);
    color: white;
    transform: scale(1.1);
}

.blog-time {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 8px;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.tag {
    background-color: var(--accent-color);
    color: white;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.9rem;
}

/* 底部信息 - 减少padding */
.bottom-fix-div {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    padding: 8px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -2px 10px var(--shadow-color);
    z-index: 1000;
    gap: 20px;
}

.right-label {
    font-size: 13px;
    color: var(--text-color);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 3px 6px;
    background-color: var(--secondary-color);
    border-radius: 10px;
}

/* 小游戏入口样式 */
.games-section {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.games-title {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}

.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.game-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px var(--shadow-color);
    border-color: var(--accent-color);
    background-color: var(--secondary-color);
}

.game-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .top-sidebar {
        padding: 8px 10px;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .search-container {
        order: 3;
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
        max-width: none;
    }
    
    .view-toggle {
        margin-left: 0;
    }
    
    .page-header {
        padding: 15px 10px 10px;
        margin-top: 80px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .stats-section {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .container {
        grid-template-columns: 1fr;
        padding: 15px 10px;
        gap: 12px;
    }
    
    .container.list-view .link-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 12px;
    }
    
    .container.list-view .link-with-dot {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .container.list-view .blog-title,
    .container.list-view .blog-time {
        margin-right: 0;
        min-width: auto;
        width: 100%;
    }
    
    .container.list-view .blog-tags {
        margin-left: 0;
        width: 100%;
    }
    
    .tag-filters {
        justify-content: flex-start;
    }
    
    .bottom-fix-div {
        flex-direction: column;
        gap: 6px;
        text-align: center;
        padding: 6px 5px;
    }

    .games-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .game-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .top-sidebar {
        padding: 6px 5px;
    }
    
    .page-header {
        padding: 12px 10px 8px;
        margin-top: 90px;
    }
    
    .page-title {
        font-size: 1.3rem;
    }
    
    .filter-section {
        padding: 12px 10px;
    }
    
    .tag-filter {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .container {
        padding: 12px 8px;
    }
    
    .right-label {
        font-size: 12px;
        padding: 2px 5px;
    }

    .games-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .game-card {
        padding: 12px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-card {
    animation: fadeIn 0.5s ease-out;
}

/* 加载状态 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 